home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Jotto ][ 1.2 / source / Jotto code ƒ / jotto endgame.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  824 b   |  37 lines  |  [TEXT/MMCC]

  1. #include "jotto endgame.h"
  2. #include "jotto graphics.h"
  3. #include "jotto environment.h"
  4. #include "sounds.h"
  5. #include "dialogs.h"
  6. #include "util.h"
  7. #include "graphics.h"
  8. #include "program globals.h"
  9.  
  10. #define loseAlert    201
  11.  
  12. void WinGame(WindowPtr theWindow)
  13. {
  14.     
  15.     HighlightChar(theWindow);
  16.     SetEndGame(TRUE);
  17.     UpdateTheWindow(theWindow);
  18.     DoSound(sound_wingame, TRUE);
  19.     SetGameInProgress(FALSE);
  20. }
  21.  
  22. void LoseGame(WindowPtr theWindow)
  23. {
  24.     Str255            tempStr;
  25.     
  26.     HighlightChar(theWindow);
  27.     DoSound(sound_losegame, TRUE);
  28.     PositionDialog('ALRT', loseAlert);
  29.     Mymemcpy((Ptr)gHumanWord[gNumTries], gComputerWord, gNumLetters);
  30.     Mymemcpy((Ptr)((long)tempStr+1), (Ptr)gComputerWord, gNumLetters);
  31.     tempStr[0]=gNumLetters;
  32.     ParamText(tempStr,"\p","\p","\p");
  33.     Alert(loseAlert, 0L);
  34.     SetGameInProgress(FALSE);
  35.     UpdateTheWindow(theWindow);
  36. }
  37.